package us.wili.dev.common.model;

/**
 * Created by JasonY on 17/3/22.
 */
public enum ClientPlatformTypeEnum {

    ANDROID("android"),
    IOS("ios"),
    WEB("web")
    ;

    private String type;

    ClientPlatformTypeEnum(String type) {
        this.type = type;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public static ClientPlatformTypeEnum get(String type) {
        if (type == null) {
            return null;
        }

        switch (type) {
            case "android": return ANDROID;
            case "ios": return IOS;
            case "web": return WEB;
            default: return null;
        }
    }
}
